﻿using System.ComponentModel;
using System.Windows.Controls;

namespace LeafBookmark.Helper
{
    static class DesignerChecker
    {
        static private bool? isInDesigner;

        static public bool IsInDesigner
        {
            get
            {
                if(null == isInDesigner)
                {
                    Button helperButton = new Button();
                    isInDesigner = DesignerProperties.GetIsInDesignMode(helperButton);
                }

                return (bool)isInDesigner;
            }
        }
    }
}
